//
//  YDOCFeatureController.m
//  YDBASE
//
//  Created by rowena on 2019/10/16.
//  Copyright © 2019 wuyezhiguhun. All rights reserved.
//

#import "YDOCFeatureController.h"
#import "YDOCFeaturePerson.h"

@interface YDOCFeatureController ()

@end

@implementation YDOCFeatureController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    YDOCFeaturePerson *person = [[YDOCFeaturePerson alloc] init];
    person.name = @"张二蛋";
//    __weak YDOCFeaturePerson *weakPerson = person;
    __weak typeof(person) weakPerson = person;
    person.block = ^{
        weakPerson.name = @"张大蛋";
        NSLog(@"wuyezhiguhun -->: YDOCFeatureController -->: viewDidLoad -->: block -->: person -->: name: %@", weakPerson.name);
        weakPerson.name = @"张三蛋";
    };
    person.block();
    
    NSLog(@"wuyezhiguhun -->: YDOCFeatureController -->: viewDidLoad -->: person -->: name: %@", weakPerson.name);
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
